3.24 \(\int \frac {c+d x}{(a+a \coth (e+f x))^2} \, dx\)

Optimal. Leaf size=133 \[ -\frac {c+d x}{4 f \left (a^2 \coth (e+f x)+a^2\right )}+\frac {x (c+d x)}{4 a^2}-\frac {3 d}{16 f^2 \left (a^2 \coth (e+f x)+a^2\right )}+\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}-\frac {c+d x}{4 f (a \coth (e+f x)+a)^2}-\frac {d}{16 f^2 (a \coth (e+f x)+a)^2} \]

[Out]

3/16*d*x/a^2/f-1/8*d*x^2/a^2+1/4*x*(d*x+c)/a^2-1/16*d/f^2/(a+a*coth(f*x+e))^2+1/4*(-d*x-c)/f/(a+a*coth(f*x+e))
^2-3/16*d/f^2/(a^2+a^2*coth(f*x+e))+1/4*(-d*x-c)/f/(a^2+a^2*coth(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3479, 8, 3730} \[ -\frac {c+d x}{4 f \left (a^2 \coth (e+f x)+a^2\right )}+\frac {x (c+d x)}{4 a^2}-\frac {3 d}{16 f^2 \left (a^2 \coth (e+f x)+a^2\right )}+\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}-\frac {c+d x}{4 f (a \coth (e+f x)+a)^2}-\frac {d}{16 f^2 (a \coth (e+f x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/(a + a*Coth[e + f*x])^2,x]

[Out]

(3*d*x)/(16*a^2*f) - (d*x^2)/(8*a^2) + (x*(c + d*x))/(4*a^2) - d/(16*f^2*(a + a*Coth[e + f*x])^2) - (c + d*x)/
(4*f*(a + a*Coth[e + f*x])^2) - (3*d)/(16*f^2*(a^2 + a^2*Coth[e + f*x])) - (c + d*x)/(4*f*(a^2 + a^2*Coth[e +
f*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3479

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(a + b*Tan[c + d*x])^n)/(2*b*d*n), x] +
Dist[1/(2*a), Int[(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0]

Rule 3730

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> With[{u = IntHide[(a
+ b*Tan[e + f*x])^n, x]}, Dist[(c + d*x)^m, u, x] - Dist[d*m, Int[Dist[(c + d*x)^(m - 1), u, x], x], x]] /; Fr
eeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0] && ILtQ[n, -1] && GtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {c+d x}{(a+a \coth (e+f x))^2} \, dx &=\frac {x (c+d x)}{4 a^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}-d \int \left (\frac {x}{4 a^2}-\frac {1}{4 f (a+a \coth (e+f x))^2}-\frac {1}{4 f \left (a^2+a^2 \coth (e+f x)\right )}\right ) \, dx\\ &=-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}+\frac {d \int \frac {1}{(a+a \coth (e+f x))^2} \, dx}{4 f}+\frac {d \int \frac {1}{a^2+a^2 \coth (e+f x)} \, dx}{4 f}\\ &=-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {d}{8 f^2 \left (a^2+a^2 \coth (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}+\frac {d \int 1 \, dx}{8 a^2 f}+\frac {d \int \frac {1}{a+a \coth (e+f x)} \, dx}{8 a f}\\ &=\frac {d x}{8 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {3 d}{16 f^2 \left (a^2+a^2 \coth (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}+\frac {d \int 1 \, dx}{16 a^2 f}\\ &=\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \coth (e+f x))^2}-\frac {c+d x}{4 f (a+a \coth (e+f x))^2}-\frac {3 d}{16 f^2 \left (a^2+a^2 \coth (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \coth (e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.56, size = 114, normalized size = 0.86 \[ \frac {\text {csch}^2(e+f x) \left (\left (4 c f (4 f x+1)+d \left (8 f^2 x^2+4 f x+1\right )\right ) \sinh (2 (e+f x))+\left (4 c f (4 f x-1)+d \left (8 f^2 x^2-4 f x-1\right )\right ) \cosh (2 (e+f x))+8 (2 c f+2 d f x+d)\right )}{64 a^2 f^2 (\coth (e+f x)+1)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/(a + a*Coth[e + f*x])^2,x]

[Out]

(Csch[e + f*x]^2*(8*(d + 2*c*f + 2*d*f*x) + (4*c*f*(-1 + 4*f*x) + d*(-1 - 4*f*x + 8*f^2*x^2))*Cosh[2*(e + f*x)
] + (4*c*f*(1 + 4*f*x) + d*(1 + 4*f*x + 8*f^2*x^2))*Sinh[2*(e + f*x)]))/(64*a^2*f^2*(1 + Coth[e + f*x])^2)

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 190, normalized size = 1.43 \[ \frac {16 \, d f x + {\left (8 \, d f^{2} x^{2} - 4 \, c f + 4 \, {\left (4 \, c f^{2} - d f\right )} x - d\right )} \cosh \left (f x + e\right )^{2} + 2 \, {\left (8 \, d f^{2} x^{2} + 4 \, c f + 4 \, {\left (4 \, c f^{2} + d f\right )} x + d\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + {\left (8 \, d f^{2} x^{2} - 4 \, c f + 4 \, {\left (4 \, c f^{2} - d f\right )} x - d\right )} \sinh \left (f x + e\right )^{2} + 16 \, c f + 8 \, d}{64 \, {\left (a^{2} f^{2} \cosh \left (f x + e\right )^{2} + 2 \, a^{2} f^{2} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + a^{2} f^{2} \sinh \left (f x + e\right )^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e))^2,x, algorithm="fricas")

[Out]

1/64*(16*d*f*x + (8*d*f^2*x^2 - 4*c*f + 4*(4*c*f^2 - d*f)*x - d)*cosh(f*x + e)^2 + 2*(8*d*f^2*x^2 + 4*c*f + 4*
(4*c*f^2 + d*f)*x + d)*cosh(f*x + e)*sinh(f*x + e) + (8*d*f^2*x^2 - 4*c*f + 4*(4*c*f^2 - d*f)*x - d)*sinh(f*x
+ e)^2 + 16*c*f + 8*d)/(a^2*f^2*cosh(f*x + e)^2 + 2*a^2*f^2*cosh(f*x + e)*sinh(f*x + e) + a^2*f^2*sinh(f*x + e
)^2)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 109, normalized size = 0.82 \[ \frac {{\left (8 \, d f^{2} x^{2} e^{\left (4 \, f x + 4 \, e\right )} + 16 \, c f^{2} x e^{\left (4 \, f x + 4 \, e\right )} + 16 \, d f x e^{\left (2 \, f x + 2 \, e\right )} - 4 \, d f x + 16 \, c f e^{\left (2 \, f x + 2 \, e\right )} - 4 \, c f + 8 \, d e^{\left (2 \, f x + 2 \, e\right )} - d\right )} e^{\left (-4 \, f x - 4 \, e\right )}}{64 \, a^{2} f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e))^2,x, algorithm="giac")

[Out]

1/64*(8*d*f^2*x^2*e^(4*f*x + 4*e) + 16*c*f^2*x*e^(4*f*x + 4*e) + 16*d*f*x*e^(2*f*x + 2*e) - 4*d*f*x + 16*c*f*e
^(2*f*x + 2*e) - 4*c*f + 8*d*e^(2*f*x + 2*e) - d)*e^(-4*f*x - 4*e)/(a^2*f^2)

________________________________________________________________________________________

maple [B]  time = 0.51, size = 354, normalized size = 2.66 \[ \frac {\frac {2 d \left (\frac {\left (f x +e \right ) \sinh \left (f x +e \right ) \left (\cosh ^{3}\left (f x +e \right )\right )}{4}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{8}-\frac {\left (f x +e \right )^{2}}{16}-\frac {\left (\cosh ^{4}\left (f x +e \right )\right )}{16}+\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{16}\right )}{f}-\frac {2 d \left (\frac {\left (f x +e \right ) \left (\sinh ^{4}\left (f x +e \right )\right )}{4}-\frac {\left (\sinh ^{3}\left (f x +e \right )\right ) \cosh \left (f x +e \right )}{16}+\frac {3 \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{32}-\frac {3 f x}{32}-\frac {3 e}{32}\right )}{f}-\frac {d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f}-\frac {2 d e \left (\frac {\left (\cosh ^{3}\left (f x +e \right )\right ) \sinh \left (f x +e \right )}{4}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{8}-\frac {f x}{8}-\frac {e}{8}\right )}{f}+\frac {d e \left (\sinh ^{4}\left (f x +e \right )\right )}{2 f}+\frac {d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+2 c \left (\frac {\left (\cosh ^{3}\left (f x +e \right )\right ) \sinh \left (f x +e \right )}{4}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{8}-\frac {f x}{8}-\frac {e}{8}\right )-\frac {c \left (\sinh ^{4}\left (f x +e \right )\right )}{2}-c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{a^{2} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/(a+a*coth(f*x+e))^2,x)

[Out]

1/a^2/f*(2/f*d*(1/4*(f*x+e)*sinh(f*x+e)*cosh(f*x+e)^3-1/8*(f*x+e)*cosh(f*x+e)*sinh(f*x+e)-1/16*(f*x+e)^2-1/16*
cosh(f*x+e)^4+1/16*cosh(f*x+e)^2)-2/f*d*(1/4*(f*x+e)*sinh(f*x+e)^4-1/16*sinh(f*x+e)^3*cosh(f*x+e)+3/32*cosh(f*
x+e)*sinh(f*x+e)-3/32*f*x-3/32*e)-1/f*d*(1/2*(f*x+e)*cosh(f*x+e)*sinh(f*x+e)-1/4*(f*x+e)^2-1/4*cosh(f*x+e)^2)-
2*d*e/f*(1/4*cosh(f*x+e)^3*sinh(f*x+e)-1/8*cosh(f*x+e)*sinh(f*x+e)-1/8*f*x-1/8*e)+1/2*d*e/f*sinh(f*x+e)^4+d*e/
f*(1/2*cosh(f*x+e)*sinh(f*x+e)-1/2*f*x-1/2*e)+2*c*(1/4*cosh(f*x+e)^3*sinh(f*x+e)-1/8*cosh(f*x+e)*sinh(f*x+e)-1
/8*f*x-1/8*e)-1/2*c*sinh(f*x+e)^4-c*(1/2*cosh(f*x+e)*sinh(f*x+e)-1/2*f*x-1/2*e))

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 107, normalized size = 0.80 \[ \frac {1}{16} \, c {\left (\frac {4 \, {\left (f x + e\right )}}{a^{2} f} + \frac {4 \, e^{\left (-2 \, f x - 2 \, e\right )} - e^{\left (-4 \, f x - 4 \, e\right )}}{a^{2} f}\right )} + \frac {{\left (8 \, f^{2} x^{2} e^{\left (4 \, e\right )} + 8 \, {\left (2 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (-2 \, f x\right )} - {\left (4 \, f x + 1\right )} e^{\left (-4 \, f x\right )}\right )} d e^{\left (-4 \, e\right )}}{64 \, a^{2} f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e))^2,x, algorithm="maxima")

[Out]

1/16*c*(4*(f*x + e)/(a^2*f) + (4*e^(-2*f*x - 2*e) - e^(-4*f*x - 4*e))/(a^2*f)) + 1/64*(8*f^2*x^2*e^(4*e) + 8*(
2*f*x*e^(2*e) + e^(2*e))*e^(-2*f*x) - (4*f*x + 1)*e^(-4*f*x))*d*e^(-4*e)/(a^2*f^2)

________________________________________________________________________________________

mupad [B]  time = 1.22, size = 88, normalized size = 0.66 \[ {\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (\frac {d+2\,c\,f}{8\,a^2\,f^2}+\frac {d\,x}{4\,a^2\,f}\right )-{\mathrm {e}}^{-4\,e-4\,f\,x}\,\left (\frac {d+4\,c\,f}{64\,a^2\,f^2}+\frac {d\,x}{16\,a^2\,f}\right )+\frac {d\,x^2}{8\,a^2}+\frac {c\,x}{4\,a^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/(a + a*coth(e + f*x))^2,x)

[Out]

exp(- 2*e - 2*f*x)*((d + 2*c*f)/(8*a^2*f^2) + (d*x)/(4*a^2*f)) - exp(- 4*e - 4*f*x)*((d + 4*c*f)/(64*a^2*f^2)
+ (d*x)/(16*a^2*f)) + (d*x^2)/(8*a^2) + (c*x)/(4*a^2)

________________________________________________________________________________________

sympy [A]  time = 1.60, size = 700, normalized size = 5.26 \[ \begin {cases} \frac {4 c f^{2} x \tanh ^{2}{\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {8 c f^{2} x \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {4 c f^{2} x}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {12 c f \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {8 c f}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {2 d f^{2} x^{2} \tanh ^{2}{\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {4 d f^{2} x^{2} \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {2 d f^{2} x^{2}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} - \frac {5 d f x \tanh ^{2}{\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {2 d f x \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {3 d f x}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {5 d \tanh {\left (e + f x \right )}}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} + \frac {4 d}{16 a^{2} f^{2} \tanh ^{2}{\left (e + f x \right )} + 32 a^{2} f^{2} \tanh {\left (e + f x \right )} + 16 a^{2} f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{\left (a \coth {\relax (e )} + a\right )^{2}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e))**2,x)

[Out]

Piecewise((4*c*f**2*x*tanh(e + f*x)**2/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f
**2) + 8*c*f**2*x*tanh(e + f*x)/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) +
4*c*f**2*x/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) + 12*c*f*tanh(e + f*x)/
(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) + 8*c*f/(16*a**2*f**2*tanh(e + f*x
)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) + 2*d*f**2*x**2*tanh(e + f*x)**2/(16*a**2*f**2*tanh(e + f*x)
**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) + 4*d*f**2*x**2*tanh(e + f*x)/(16*a**2*f**2*tanh(e + f*x)**2
+ 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) + 2*d*f**2*x**2/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tan
h(e + f*x) + 16*a**2*f**2) - 5*d*f*x*tanh(e + f*x)**2/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f
*x) + 16*a**2*f**2) + 2*d*f*x*tanh(e + f*x)/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a
**2*f**2) + 3*d*f*x/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) + 5*d*tanh(e +
 f*x)/(16*a**2*f**2*tanh(e + f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2) + 4*d/(16*a**2*f**2*tanh(e +
 f*x)**2 + 32*a**2*f**2*tanh(e + f*x) + 16*a**2*f**2), Ne(f, 0)), ((c*x + d*x**2/2)/(a*coth(e) + a)**2, True))

________________________________________________________________________________________